﻿// <copyright file="ConfigurationTest.cs" company="QUT">
//     Copyright (c) Ninety Nine Percent. All rights reserved.
// </copyright>

namespace GenerateKml
{
    using System;
    using System.Collections.Generic;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using GenerateKml.Properties;
    using NUnit.Framework;

    /// <summary>
    /// A class for testing Configuration class. 
    /// </summary>
    [TestFixture]
    public class ConfigurationTest 
    {
        /// <summary>
        /// the expected string colour value
        /// </summary>
        private string expected;

        /// <summary>
        /// the current string colour value
        /// </summary>
        private string actual;

        /// <summary>
        /// Initializes the all data member in the test.
        /// </summary>
        [SetUp]
        public void Initialize() 
        {
            this.expected = Color.Blue.ToArgb().ToString();
        }

        /// <summary>
        /// A test for ShowWelcomeScreen
        /// </summary>
        [Test]
        public void ShowWelcomeScreenTest() 
        {
            bool exp = false;
            bool cur;
            Configuration.ShowWelcomeScreen = exp;
            cur = Configuration.ShowWelcomeScreen;
            Assert.AreEqual(exp, cur, "Verify the correctness of show welcome screen test method.");
        }

        /// <summary>
        /// A test for OTHColour
        /// </summary>
        [Test]
        public void OTHColourTest() 
        {
            Settings.Default.OTHColour = this.expected;
            this.actual = Settings.Default.OTHColour;
            Assert.AreEqual(this.expected, this.actual, "Verify the correctness of OTH colour test method.");
        }

        /// <summary>
        /// A test for NPColour
        /// </summary>
        [Test]
        public void NPColourTest() 
        {
            Settings.Default.NPColour = this.expected;
            this.actual = Settings.Default.NPColour;
            Assert.AreEqual(this.expected, this.actual, "Verify the correctness of NP colour test method.");
        }

        /// <summary>
        /// A test for LPColour
        /// </summary>
        [Test]
        public void LPColourTest() 
        {
            Settings.Default.LPColour = this.expected;
            this.actual = Settings.Default.LPColour;
            Assert.AreEqual(this.expected, this.actual, "Verify the correctness of LP colour test method.");
        }

        /// <summary>
        /// A test for GRNColour
        /// </summary>
        [Test]
        public void GRNColourTest() 
        {
            Settings.Default.GRNColour = this.expected;
            this.actual = Settings.Default.GRNColour;
            Assert.AreEqual(this.expected, this.actual, "Verify the correctness of GRN colour test method.");
        }

        /// <summary>
        /// A test for DEMColour
        /// </summary>
        [Test]
        public void DEMColourTest() 
        {
            Settings.Default.DEMColour = this.expected;
            this.actual = Settings.Default.DEMColour;
            Assert.AreEqual(this.expected, this.actual, "Verify the correctness of DEM colour test method.");
        }

        /// <summary>
        /// A test for ALPColour
        /// </summary>
        [Test]
        public void ALPColourTest() 
        {
            Settings.Default.ALPColour = this.expected;
            this.actual = Settings.Default.ALPColour;
            Assert.AreEqual(this.expected, this.actual, "Verify the correctness of ALP colour test method.");
        }
    }
}
